{template 'header'}
<!--当前位置-->
<div class="location layout960">
	当前位置: <a href="{SITE_URL}">首页</a>&nbsp;»&nbsp; <a href="{SITE_URL}{$MODULE[$moduleid][moduledir]}/grade.php">会员升级</a>
</div>
<!--当前位置 end-->
<div class="layout960 fn-clear">
	<div class="row fn-clear">
		<!--升级表单 start-->
		<div class="mupdate-left fn-left">
			<h2>在线升级</h2>
			<div class="content">
				<form class="update-form"  method="post" action="grade.php" id='pub-form'>
					<input type="hidden" name="groupid" value="{$groupid}"/>
					<table class="update-table" cellspacing="0" width="708">
						<tbody>
						<tr>
							<th width="20%">
								<span class="form-require">*</span> 升级为：
							</th>
							<td class="update-to" width="80%">
								{if $UP}
									{if $groupid}
									{$UP[$groupid][groupname]}
									{else}
									<a href="#selectGroup">请选择升级会员组</a>
									{/if}
								{else}
									暂时没有供您升级的会员组
								{/if}
								&nbsp;
								{if $_userid}
								您的当前会员组为
								<span>{$GROUP[$_groupid][groupname]}</span>
								{else}
								您还没有登录，建议您先 <a href="{url('member/login')}" >登录</a> 或 <a href="{url('member/register')}" >注册会员</a>
								{/if}
							</td>
						</tr>
						<tr >
							<td colspan="2" >
								<table cellspacing="0" width="708">
									<tr align="center">
										{loop $GROUPS $k $v}
										<td width="{$percent}">{str_replace('-', '<br>', $v[groupname])}</td>
										{/loop}
									</tr>
									<tr align="center">
										{loop $GROUPS $k $v}
										<td>{if isset($UP[$k])}
											  {if $v[groupid]!=$groupid}
											<a href="{url('member/grade', 'groupid='.$v[groupid].'#up')}">点击升级</a>
											  {else}
											点击升级
											  {/if}
											{else}
											&nbsp;{/if}</td>
										{/loop}
									</tr>
								</table>
							</td>
						</tr>
						{if $fee}
						<tr >
							<th>所需费用：</th>
							<td>{$fee}{$DT[money_unit]}/年</td>
						</tr>
						{/if}
						{if $need_fee}
						<tr>
							<th>账户余额：</th>
							<td>{$_money} {$DT[money_unit]}{if $fee>$_money}&nbsp;&nbsp;您的余额不足,<a href="charge.php?action=pay" target="_blank">请充值</a>{/if}</td>
						</tr>
						{/if}
						<tr>
							<th>
								<span class="form-require">*</span> <label for="company">企业全称：</label>
							</th>
							<td>
								<input type="text" name="company" id="company" {if $could_up}class="graybd-ipt easyui-validatebox" data-options="required:true,validType:'length[1,50]',missingMessage:'请填写企业全称'"{/if}  value="{$company}" size="50"/>
								<span id="dcompany" class="form-warning"></span>
							</td>
						</tr>
						<tr>
							<th>
								<span class="form-require">*</span> <label for="truename">联系人：</label>
							</th>
							<td>
								<input name="truename" type="text" id="truename" size="20" {if $could_up}class="graybd-ipt easyui-validatebox" data-options="required:true,validType:'length[1,20]',missingMessage:'请填写联系人'"{/if}  value="{$truename}"/>
								<span id="dtruename" class="form-warning"></span>
							</td>
						</tr>
						<tr>
							<th>
								<span class="form-require">*</span> <label for="telephone">电话号码：</label>
							</th>
							<td>
								<input name="telephone" id="telephone" type="text" {if $could_up}class="graybd-ipt easyui-validatebox" data-options="required:true,validType:'length[1,20]',missingMessage:'请填写电话号码'"{/if} size="30" value="{$telephone}"/>
								<span id="dtelephone" class="form-warning"></span>
							</td>
						</tr>
						<tr>
							<th><label for="mobile">手机号码：</label></th>
							<td>
								<input name="mobile" id="mobile" type="text" size="30" value="{$mobile}"/>
								<span id="dmobile" class="form-warning"></span>
							</td>
						</tr>
						<tr>
							<th>
								<label for="email">电子邮箱：</label>
							</th>
							<td >
								<input name="email" id="email" type="text" size="30" value="{$email}"/>
							</td>
						</tr>
						{if $DT[im_qq]}
						<tr>
							<th > QQ：</th>
							<td><input name="qq" type="text" size="20" value="{$qq}"/></td>
						</tr>
						{/if}
						{if $DT[im_ali]}
						<tr>
							<th > 阿里旺旺：</th>
							<td><input name="ali" type="text" size="20" value="{$ali}"/></td>
						</tr>
						{/if}
						{if $DT[im_msn]}
						<tr>
							<th > MSN：</th>
							<td><input name="msn" type="text" size="30" value="{$msn}"/></td>
						</tr>
						{/if}
						{if $DT[im_skype]}
						<tr>
							<th> Skype：</th>
							<td><input name="skype" type="text" size="20" value="{$skype}"/></td>
						</tr>
						{/if}
						<tr>
							<td></td>
							<td>
								<input type="submit"  name='submit' value=" 提 交 " {if !$could_up} disabled{/if}/>
								{if !$could_up}(请选择升级会员组){/if}
							</td>
						</tr>
						</tbody>
					</table>
				</form>
			</div>
		</div>
		<script type="text/javascript">
			seajs.use(['$'], function ($) {
				$('#pub-form').on('submit', function(){
					return $('#pub-form').form('validate');
				});
			})
		</script>
		<!--升级表单 end-->
		<!--升级说明 start-->
		<div class="mupdate-right fn-right">
			<h2>相关说明</h2>
			<div class="content">
				<p>如果升级有任何问题</p>
				<p>请致电客户专员</p>
				<p>服务电话：{$DT[telephone]}</p>
			</div>
		</div>
		<!--升级说明 end-->
	</div>
	<!--会员等级说明 start-->
	<table class="mlevel-table" width="100%">
		<tbody>
		<tr bgcolor="#F1F7FC" align="center">
			<td width="{$percent}">会员级别 <a name="selectGroup"></a></td>
			{loop $GROUPS $k $v}
			<td width="{$percent}">{str_replace('-', '<br>', $v[groupname])}</td>
			{/loop}
		</tr>
		<tr align="center">
			<td>&nbsp;</td>
			{loop $GROUPS $k $v}
			<td>{if isset($UP[$k])}<a href="{url('member/grade', 'groupid='.$v[groupid].'#up')}">现在升级</a>{else}&nbsp;{/if}</td>
			{/loop}
		</tr>
		<tr bgcolor="#F1F7FC" align="center">
			<td width="{$percent}">发布范围</td>
			{loop $GROUPS $k $v}
			<td  width="{$percent}">{$v[description]}</td>
			{/loop}
		</tr>
		<tr>
			<td>收费模式</td>
			{loop $GROUPS $k $v}
			<td>{if $v[fee_mode]}包年{else}免费{/if}</td>
			{/loop}
		</tr>
		<tr>
			<td>年费</td>
			{loop $GROUPS $k $v}
			<td>{if $v[fee]}{$v[fee]}{$DT[money_unit]}/年{else}--{/if}</td>
			{/loop}
		</tr>
		<tr>
			<td>收件箱</td>
			{loop $GROUPS $k $v}
			<td>
				{if $v[inbox_limit] == -1}
				0
				{elseif $v[inbox_limit] == 0}
				不限
				{else}
				{$v[inbox_limit]}
				{/if}
			</td>
			{/loop}
		</tr>
		<tr>
			<td>站内信</td>
			{loop $GROUPS $k $v}
			<td>
				{if $v[message_limit] == -1}
				0
				{elseif $v[message_limit] == 0}
				不限
				{else}
				{$v[message_limit]}
				{/if}
			</td>
			{/loop}
		</tr>
		<tr>
			<td>好友</td>
			{loop $GROUPS $k $v}
			<td>
				{if $v[friend_limit] == -1}
				0
				{elseif $v[friend_limit] == 0}
				不限
				{else}
				{$v[friend_limit]}
				{/if}
			</td>
			{/loop}
		</tr>
		<tr>
			<td>提醒</td>
			{loop $GROUPS $k $v}
			<td>
				{if $v[alert_limit] == -1}
				0
				{elseif $v[alert_limit] == 0}
				不限
				{else}
				{$v[alert_limit]}
				{/if}
			</td>
			{/loop}
		</tr>
		<tr>
			<td>收藏</td>
			{loop $GROUPS $k $v}
			<td>
				{if $v[favorite_limit] == -1}
				0
				{elseif $v[favorite_limit] == 0}
				不限
				{else}
				{$v[favorite_limit]}
				{/if}
			</td>
			{/loop}
		</tr>
		{loop $MODULE $k $v}
		{if $v['isuserupgrade']}
		<tr >
			<td>{if $v['name']=='人才'}招聘{else}{$v['name']}{/if}</td>
			{loop $GROUPS $gk $gv}
			<td>
				{if $gv[$v[moduledir].'_limit'] == -1}
				0
				{elseif $gv[$v[moduledir].'_limit'] == 0}
				不限
				{else}
				{$gv[$v[moduledir].'_limit']}
				{/if}
			</td>
			{/loop}
		</tr>
		{/if}
		{/loop}
		{if $UP}
		<tr >
			<td>&nbsp;</td>
			{loop $GROUPS $k $v}
			<td>{if isset($UP[$k])}<a href="?groupid={$v[groupid]}#up">现在升级</a>{else}&nbsp;{/if}</td>
			{/loop}
		</tr>
		{/if}
		<tr bgcolor="#F1F7FC" align="center">
			<td width="{$percent}">会员级别</td>
			{loop $GROUPS $k $v}
			<td  width="{$percent}">{str_replace('-', '<br>', $v[groupname])}</td>
			{/loop}
		</tr>
		</tbody>
	</table>
	<!--会员等级说明 end-->
</div>
<!--主体部分 end-->

<script type="text/javascript">
	function pcode(s) {
		if ( s.length > 4 ) {
			makeRequest('action={Crypt::action('promo')}&code=' + s, '?', '_pcode');
		}
	}
	function _pcode() {
		if ( xmlHttp.readyState == 4 && xmlHttp.status == 200 ) {
			if ( xmlHttp.responseText ) Dd('code').innerHTML = '<span class="cred">' + xmlHttp.responseText + '</span>';
		}
	}
</script>
{template 'footer'}